<div id="newsHeader">
	<h3>TRANG CHỦ<img src="styles/images/baner-marker-active.gif" class="map">GIỎ HÀNG</h3>
</div>
		<div id="newsContainer">
					<fieldset id="cartDetailsContainer">
					<legend>Chi Tiết Giỏ Hàng</legend>
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<thead>
						<tr>
							<th scope="col" align="center" valign="middle" width="40">TT</th>
							<th scope="col" align="left" valign="middle">Loại Thẻ</th>
							<th scope="col" align="right" valign="middle" width="150">Giá Bán</th>
							<th scope="col" align="center" valign="middle" width="100">Số Lượng</th>
							<th scope="col" align="right" valign="middle" width="150">Thành Tiền</th>
							<th scope="col" align="center" valign="middle" width="40">&nbsp;</th>
						</tr>
					</thead>
						<tbody>
						<? if(!$giohang){?>
								<tr>
									<td colspan="6" align="left" valign="middle"><center><font color=red>Chưa có thẻ nào trong giỏ hàng</font></center></td>
								</tr>
						</tbody>
						<? }else{ $i=1;$total = 0; foreach($giohang as $key => $value){ ?>
									<tr>
										<td align="center" valign="middle" width="40"><?=$i;?></td>
										<td align="left" valign="middle"><?=$value->Denomination;?></td>
										<td align="right" valign="middle" width="150"><?=number_format($value->Price);?> VNĐ</td>
										<td align="center" valign="middle" width="100">
											<img src="styles/images/quantity_down.png" onclick="cartUpdate('<?=$value->Id;?>','DOWN');" style="cursor:pointer;">
											<input name="xQuantity[<?=$cart[$value->Id];?>]" value="<?=$cart[$value->Id];?>" id="quantity<?=$value->Id;?>" onblur="cartUpdate('<?=$value->Id;?>','');" style="width:35px;text-align:center;" type="text">
											<img src="styles/images/quantity_up.png" onclick="cartUpdate('<?=$value->Id;?>','UP');" style="cursor:pointer;">
										</td>
										<td align="right" valign="middle" width="150"><?=number_format($cart[$value->Id]*$value->Price);?> VNĐ</td>
										<td align="center" valign="middle" width="40">
											<img src="styles/images/remove.png" onclick="removeCart(<?=$value->Id;?>);" style="cursor:pointer;">
										</td>
									</tr>
						<?$i++; $total = $total + $cart[$value->Id]*$value->Price ;}?>
						</tbody>
						<tfoot>
								<tr>
									<td colspan="4" align="right" valign="middle">Tổng :</td>
									<td align="right" valign="middle" width="150"><?=number_format($total);?> VNĐ</td>
									<td align="center" valign="middle" width="40">&nbsp;</td>
								</tr>
						</tfoot>
						<? } ?>
					</table>
				</fieldset>
				<? if($giohang) { ?>
							<fieldset id="couponContainer">
								<legend>Mã Giảm Giá</legend>
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tbody><tr>
									<td valign="middle">
										<input name="xCoupon" id="xCoupon" type="text">
									</td>
									<td align="right" valign="middle" width="100">
										<button onclick="addCoupon();"><span>Áp Dụng</span></button>&nbsp;
									</td>
								</tr>
								</tbody></table>
							</fieldset>
							<fieldset id="paymentContainer">
								<legend>Phương Thức Thanh Toán</legend>
								<ul>
									<? foreach($payment as $pkey => $pvalue){ ?>
									<li>
										<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
											<tbody>
												<tr>
													<td align="center" width="130">
														<img src="styles/<?=$pvalue->img;?>"><br>
													</td>
													<td>
														<h3>Số Tiền : $<?=number_format(round($total/$pvalue->price,2),2);?> USD</h3>
														 Thanh toán bằng e-Currency thông qua <?=$pvalue->paygate_name?>.<br>Nhận mã thẻ ngay sau khi thanh toán.
													</td>
													<td align="center" valign="middle" width="50">
														<a href="https://www.buycard.vn/vn/checkout/LRUSD"><img src="gio%20hang_files/payment-arrow.png" title="Bấm vào đây để thanh toán"></a>
													</td>
												</tr>
											</tbody>
										</table>
									</li>
									<?}?>

								</ul>
							</fieldset>
				<?}?>
			</div>
